// import Login from './../views/Login.vue'
import Login from './../views/Login2.vue'
import NotFound from './../views/error/404.vue'
import NotFound3 from './../views/error/403.vue'
import loading from './../views/nav1/loading.vue'
import echarts from './../views/charts/echarts.vue'
import monitor from './../views/monitor/index.vue'
import register from './../views/account/register.vue'
import Provision from './../views/account/Provision.vue'
import ft_password from './../views/account/ft_password.vue'
// import hdpi from './../views/hdpi/index.vue'

let Home = resolve => require(['./../views/Home.vue'], resolve) ;
let hdpi= resolve => require(['./../views/hdpi/index.vue'], resolve);
let num = resolve => require(['./../views/hdpi/content.vue'], resolve);
let routes = [{
        path: '/login',
        component: Login,
        name: '',
        hidden: true
    },
    {
        path: '/Provision',
        component:  Provision ,
        name: '',
        hidden: true
    },
    {
        path: '/account/register',
        component: register,
        name: '',
        hidden: true
    },
    {
        path: '/account/ft_password',
        component: ft_password,
        name: '',
        hidden: true
    },
    {
        path: '/monitor',
        component: monitor,
        name: '',
        meta: { title: '首页', icon: 'dashboard', affix: true },
        hidden: true
    },
    {
        path: '/',
        component: Home,
        children: [{ 
            path: '/devices/history',
            component: resolve => require(['./../views/devices/history.vue'], resolve),
            name: '',
        }],
        hidden: true
    },  
    {
        path: '/',
        component: Home,
        children: [{ 
            path: '/devices/powerhistory',
            component: resolve => require(['./../views/devices/powerhistory.vue'], resolve),
            name: '',
        }],
        hidden: true
    }, 
    {
        path: '/',
        component: Home,
        children: [{ 
            path: '/devices/powerMonitor',
            component: resolve => require(['./../views/devices/powerMonitor.vue'], resolve),
            name: '',
        }],
        hidden: true
    },
    {
        path: '/',
        component: Home,
        children: [{
            path: '/devices/query_user_event',
            component: resolve => require(['./../views/devices/operationLogs.vue'], resolve),
            name: '操作日志',
        }],
        hidden: true
    },
    {
        path: '/',
        component: Home,
        children: [{
            path: '/company/companyDetail',
            component: resolve => require(['./../views/user/company/companyDetail.vue'], resolve),
            name: '组织详情',
        }],
        hidden: true
    },
    {
        path: '/',
        component: Home,
        children: [{
            path: '/company/companyTree',
            component: resolve => require(['./../views/user/company/companyTree.vue'], resolve),
            name: '客户关系',
        }],
        hidden: true
    },
    {
        path: '/',
        component: Home,
        children: [{
            path: '/system/data_unit',
            component: resolve => require(['./../views/system/dataUnit.vue'], resolve),
            name: '',
        }],
        hidden: true
    },
    {
        path: '/',
        component: Home,
        children: [{
            path: '/system/dict',
            component: resolve => require(['./../views/system/dict.vue'], resolve),
            name: '',
        }],
        hidden: true
    },
    {
        path: '/',
        component: Home,
        children: [{
            path: '/devices/gatewaydis',
            component: resolve => require(['./../views/devices/gatewaydis.vue'], resolve),
            name: '',
        }],
        hidden: true
    },
    {
        path: '/',
        component: Home,
        children: [{
            path: '/template/app',
            component: resolve => require(['./../views/user/weixin/officialnum.vue'], resolve),
            name: '',
        }],
        hidden: true
    },
    {
        path: '/',
        component: Home,
        children: [{
            path: '/template/ui',
            component: resolve => require(['./../views/template/uitemplate.vue'], resolve),
            name: '',
        }],
        hidden: true
    },
    {
        path: '/',
        component: Home,
        children: [{
            path: '/company/companyUI',
            component: resolve => require(['./../views/company/companyUI.vue'], resolve),
            name: '',
        }],
        hidden: true
    },
    {
        path: '/',
        component: Home,
        children: [{
            path: '/template/uicmd',
            component: resolve => require(['./../views/template/uicmd.vue'], resolve),
            name: '',
        }],
        hidden: true
    },
    {
        path: '/',
        component: Home,
        children: [{ 
            path: '/template/registerset',
            component: resolve => require(['./../views/template/registerset.vue'], resolve),
            name: '',
        }],
        hidden: true
    },
    // {
    //     path: '/',
    //     component: Home,
    //     children: [{
    //         path: '/devices/list',
    //         component: resolve => require(['./../views/devices/list.vue'], resolve),
    //         name: '',
    //     }],
    //     hidden: true
    // },
    {
        path: '/',
        component: Home,
        children: [{
            path: '/alarms/triggers/add',
            component: resolve => require(['./../views/alarms/triggers/add.vue'], resolve),
            name: '',
        }],
        hidden: true
    },
    {
        path: '/',
        component: Home,
        children: [{
            path: '/template/edit',
            component: resolve => require(['./../views/template/edit.vue'], resolve),
            name: '数据点列表',
        }],
        hidden: true
    },
    {
        path: '/',
        component: Home,
        children: [{
            path: '/suggest/item',
            component: resolve => require(['./../views/suggest/item.vue'], resolve),
            name: '工单详情',
        }],
        hidden: true
    },
    {
        path: '/',
        component: Home,
        children: [{
            path: '/devices/bindlist',
            component: resolve => require(['./../views/devices/bindlist.vue'], resolve),
            name: '用户绑定列表',
        }],
        hidden: true
    },
    {
        path: '/',
        component: Home,
        children: [{
            path: '/devices/edit',
            component: resolve => require(['./../views/devices/edit.vue'], resolve),
            name: '设备属性',
        }],
        hidden: true
    },
    {
        path: '/',
        component: Home,
        children: [{
            path: '/devices/deviceDatail',
            component: resolve => require(['./../views/devices/deviceDatail.vue'], resolve),
            name: '设备详情',
        }],
        hidden: true
    },
    {
        path: '/',
        component: Home,
        children: [{
            path: '/system/svg',
            component: resolve => require(['./../views/system/svg.vue'], resolve),
            name: 'svg管理',
        }],
        hidden: true
    },
    {
        path: '/',
        component: Home,
        children: [{
            path: '/devices/communicate/details',
            component: resolve => require(['./../views/devices/communicate/details.vue'], resolve),
            name: '固件详情',
        }],
        hidden: true
    },
    {
        path: '/',
        component: Home,
        children: [{
            path: '/devices/lower_computer/details',
            component: resolve => require(['./../views/devices/lower_computer/details.vue'], resolve),
            name: '参数详情',
        }],
        hidden: true
    },
    {
        path: '/',
        component: Home,
        children: [{
            path: '/template/add',
            component: resolve => require(['./../views/template/add.vue'], resolve),
            name: '添加设备数据配方',
        }],
        hidden: true
    },
    {
        path: '/',
        component: Home,
        children: [{
            path: '/template/adds',
            meta:{keepAlive:true},
            component: resolve => require(['./../views/template/adds.vue'], resolve),
            name: '添加设备数据配方内容',
        }],
        hidden: true
    },
    {
        path: '/',
        component: Home,
        children: [{
            path: '/template/edits',
            component: resolve => require(['./../views/template/edits.vue'], resolve),
            name: '修改设备数据配方内容'
        }],
        hidden: true
        
    },

    {
        path: '/',
        component: Home,
        children: [{
            path: '/devices/adds',
            component: resolve => require(['./../views/devices/adds.vue'], resolve),
            name: '添加设备',
        }],
        hidden: true
    },
    {
        path: '/loading',
        component: loading,
        name: '',
        hidden: true
    },
    {
        path: '/404',
        component: NotFound,
        name: '',
        hidden: true
    },
    {
        path: '/403',
        component: NotFound3,
        name: '',
        hidden: true
    },
    {

        name: '大屏图',
        leaf: true,
        hidden:true,
        path: '/hdpihistry',
        params:{
            name:'nameValue',
            code:10011
            },
            query: { plan: 'private' },
        component: resolve => require(['./../views/devices/history.vue'], resolve),


    },
    {

        name: '大屏图',
        leaf: true,
        hidden:true,
        path: '/hdpidevice',
        params:{
            name:'nameValue',
            code:10011
            },
            query: { plan: 'private' },
        component: resolve => require(['./../views/hdpi/hdpidevice.vue'], resolve),


    },
    {
        path: '/',
        component: Home,
        hidden:true,
        children: [{
            name: '图标组详情',
            path: '/devices/icon/grouplist',
            component: resolve => require(['./../views/devices/icon/grouplist.vue'], resolve),
        }]


    },
    {
        path: '/',
        component: Home,
        hidden:true,
        children: [{
            name: '告警规则列表',
            path: '/alarms/triggerslist',
            component: resolve => require(['./../views/alarms/triggerslist.vue'], resolve),
        }]


    },
    {
        path: '/',
        component: Home,
        hidden:true,
        children: [{
            name: '添加设备配方',
            path: '/template/deviceadd',
            component: resolve => require(['./../views/template/deviceadd.vue'], resolve),
        }]


    },
    {
        path: '/',
        component: Home,
        hidden:true,
        children: [{
            name: '编辑设备配方',
            path: '/template/deviceedit',
            component: resolve => require(['./../views/template/deviceedit.vue'], resolve),
        }]


    },
    {

        name: '大屏图',
        leaf: true,
        hidden:true,
        path: '/givehistry',
        component: resolve => require(['./../views/alarms/history.vue'], resolve),


    },
    {
        path: '/',
        component: hdpi,
        name: '大屏图',
        leaf: true,
        
        hidden:true,
        iconCls: 'fa fa-id-card-o',
        children: [{
            path: '/hdpi',
            component: num,
            name: '大屏图'
        },{
            path: '/topo',
            component: resolve => require(['./../views/hdpi/topo.vue'], resolve),
            name: '组态大屏'
        },{
            path: '/charging',
            component: resolve => require(['./../views/hdpi/charging.vue'], resolve),
            name: '充电桩大屏'
        },{
            path: '/checkCamera',
            component: resolve => require(['./../views/hdpi/checkCamera.vue'], resolve),
            name: '摄像头监控'
        },{
            path: '/temperature',
            component: resolve => require(['./../views/hdpi/temperature.vue'], resolve),
            name: '温度监控'
        },{
            path: '/track',
            component: resolve => require(['./../views/hdpi/track.vue'], resolve),
            name: '温度监控'
        }]

    },
    {
        path: '/newindex',
        component: resolve => require(['./../views/hdpi/newindex.vue'], resolve),
        name: '新大屏图',
        leaf: true,
        hidden:false,
    },
    {
        path: '/',
        component: Home,
        name: '首页',
        leaf: true,
        hidden:true,
        children: [{
            path: '/home_page',
            component: resolve => require(['./../views/account/home_page.vue'], resolve),
            name: '首页',
            meta: { title: '首页', icon: 'dashboard', affix: true }
        }]

    },
    {
        path: '/',
        component: Home,
        name: '临时菜单页',
        iconCls: 'fa fa-address-card', 
        // leaf: true,//只有一个节点
        children: [{
                path: '/article/list1',
                component: resolve => require(['./../views/article/list.vue'], resolve),
                name: '资讯列表',
                query: {id: '1'}
            },
            {
                path: '/article/list2',
                component: resolve => require(['./../views/article/list.vue'], resolve),
                name: '视频列表',
                query: {id: '1'} 
            },
            {
                path: '/article/list0',
                component: resolve => require(['./../views/article/list.vue'], resolve),
                name: '系统信息',
                query: {id: '1'}
            },
            {
                path: '/article/list3',
                component: resolve => require(['./../views/article/list.vue'], resolve),
                name: '社区列表',
                query: {id: '1'}
            },
            {
                path: '/article/list4',
                component: resolve => require(['./../views/article/list.vue'], resolve),
                name: '模型列表',
                query: {id: '1'}
            },
            {
                path: '/article/details',
                component: resolve => require(['./../views/article/details.vue'], resolve),
                name: '用户信息'
            },
        ]
    },
    {
        path: '/',
        component: Home,
        name: '设备管理',
        children: [{
            path: '/upgrade/slaveList',
            component: resolve => require(['../views/device/upgrade/slaveList.vue'], resolve),
            name: '从机列表'
        }]

    },
    {
        path: '/',
        component: Home,
        name: '设备详情',
        children: [{
            path: '/devices/videoList',
            component: resolve => require(['../views/devices/videoList.vue'], resolve),
            name: '视频列表'
        }]

    },
    {
        path: '/',
        component: Home,
        name: '',
        children: [{
            path: '/template/uicmdCheck',
            component: resolve => require(['../views/template/uicmdCheck.vue'], resolve),
            name: '校验'
        }]

    },
    // { //重定向到404
    //     path: '*', redirect: '/404' },
 
    // {
    //     path: '/',
    //     component: Home,
    //     name: '临时菜单页',
    //     iconCls: 'fa fa-address-card',
    //     // leaf: true,//只有一个节点
    //     children: [{
    //             path: '/nav2/test1',
    //             component: resolve => require(['./../views/nav2/test1.vue'], resolve),
    //             name: '查询网关型号'
    //         },
    //         {
    //             path: '/account/test2',
    //             component: resolve => require(['./../views/nav2/test2.vue'], resolve),
    //             name: '设备网关控制'
    //         },
    //         {
    //             path: '/account/profile',
    //             component: resolve => require(['./../views/account/index.vue'], resolve),
    //             name: '用户信息'
    //         },
    //         {
    //             path: '/account/password',
    //             component: resolve => require(['./../views/account/index.vue'], resolve),
    //             name: '用户密码'
    //         },
    //         {
    //             path: '/account/compass',
    //             component: resolve => require(['./../views/account/index.vue'], resolve),
    //             name: '通讯密码'
    //         }
    //     ]
    // },
    // {
    //     path: '/',
    //     component: Home,
    //     name: '数据管理',
    //     iconCls: 'fa fa-address-card',
    //     // leaf: true,//只有一个节点
    //     children: [
    //         { path: '/dataManager', component: resolve => require(['./../views/dataManager/index.vue'],resolve), name: '数据模板' },
    //         { path: '/dataManager/dataPush', component: resolve => require(['./../views/dataManager/dataPush.vue'],resolve), name: '数据推送' },
    //         { path: '/dataManager/dataHistoryList', component: resolve => require(['./../views/dataManager/dataHistoryList.vue'],resolve), name: '历史记录' },
    //     ]
    // },
    // {
    //     path: '/',
    //     component: Home,
    //     name: '设备管理',
    //     iconCls: 'fa fa-address-card',
    //     // leaf: true,//只有一个节点
    //     children: [
    //         { path: '/account', component: resolve => require(['./../views/account/index.vue'],resolve), name: '设备总览' },
    //         { path: '/account/secUser', component: resolve => require(['./../views/account/index.vue'],resolve), name: '设备列表' },
    //         { path: '/account/profile', component: resolve => require(['./../views/account/index.vue'],resolve), name: '关注列表' },
    //         { path: '/account/password', component: resolve => require(['./../views/account/index.vue'],resolve), name: '添加列表' },
    //         { path: '/account/compass', component: resolve => require(['./../views/account/index.vue'],resolve), name: '设备类型管理' }
    //     ]
    // },
    // {
    //     path: '/',
    //     component: Home,
    //     name: '告警管理',
    //     iconCls: 'fa fa-address-card',
    //     // leaf: true,//只有一个节点
    //     children: [
    //         { path: '/account', component: resolve => require(['./../views/account/index.vue'],resolve), name: '角色管理' },
    //         { path: '/account/secUser', component: resolve => require(['./../views/account/index.vue'],resolve), name: '子用户管理' },
    //         { path: '/account/profile', component: resolve => require(['./../views/account/index.vue'],resolve), name: '用户信息' },
    //         { path: '/account/password', component: resolve => require(['./../views/account/index.vue'],resolve), name: '用户密码' },
    //         { path: '/account/compass', component: resolve => require(['./../views/account/index.vue'],resolve), name: '通讯密码' }
    //     ]
    // },
    // {
    //     path: '/',
    //     component: Home,
    //     name: 'Charts',
    //     iconCls: 'fa fa-bar-chart',
    //     children: [
    //         { path: '/echarts', component: echarts, name: 'echarts' }
    //     ]
    // }
];

export default routes;